package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    int deleteByPrimaryKey(Integer productId);
    //增加商品
    int insert(Product product);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer productId);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKeyWithBLOBs(Product record);

    int updateByPrimaryKey(Product record);

    //根据活动标志查询商品
    List<Product> selectProductByActiveSign(int activeSign);

    /*根据二级分类Id查询三级商品*/
    List<Product> selectProductByRJClassId(@Param("rjClassId") int rjClassId);

    //查询荟生商品
    List<Product> selectProductHsys();

    //查询所有商品
    List<Product> selectProductsList();
    List<Product> selectSupplier();
}